<link type="text/css" href="https://cdn.bootcdn.net/ajax/libs/element-ui/2.13.2/theme-chalk/index.css" rel="stylesheet">
<script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.11/vue.min.js"></script>
<script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/element-ui/2.13.2/index.js"></script>



<!-- 框架的组件文档 "https://element.eleme.cn/#/zh-CN/component/carousel" -->
<div id="app9" >
	<template >
		<div class="block">
			<el-carousel>
				<el-carousel-item >
					<img src='http://b-ssl.duitang.com/uploads/blog/201505/18/20150518025109_Lfmcx.jpeg' alt="..." style="width: 100%;height: 100%">
				</el-carousel-item>
				<el-carousel-item >
					<img src='http://img3.imgtn.bdimg.com/it/u=2208162519,4010854312&fm=26&gp=0.jpg' alt="..." style="width: 100%;height: 100%">
				</el-carousel-item>
				<el-carousel-item >
					<img src='https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2472153115,3034378969&fm=26&gp=0.jpg' alt="..." style="width: 100%;height: 100%">
				</el-carousel-item>
			</el-carousel>
		</div>
	</template>
</div>

<script type="text/javascript">
	//轮播图组件初始化
	var Main1 = {
		data() {
			return {
	        	img: []//传入每一项的值在v-for中调用
	    	}
		}
	}
	var Ctor = Vue.extend(Main1);
	new Ctor().$mount('#app9');
	//获取轮播图项点击事件
	$('.el-carousel__container>div.el-carousel__item').click(function(){
		console.log($(this).index());

	})
</script>